package com.whj.apipassenger.remote;

import com.whj.internalcommon.dto.ResponseResult;
import com.whj.internalcommon.request.VerificationCodeDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Auther: wanghaijun
 * @Date: 2022/12/28 - 12 - 28 - 17:07 
 * @Description: com.whj.apipassenger.remote
 */

@FeignClient("service-passenger-user")
public interface ServicePassengerUserClient {

    @RequestMapping(method = RequestMethod.POST,value = "/user")
    ResponseResult loginOrRegister(@RequestBody VerificationCodeDTO verificationCodeDTO);

    @RequestMapping(method = RequestMethod.GET,value = "/user/{phone}")
    ResponseResult getUserByPhone(@PathVariable("phone") String phone);
}
